<!DOCTYPE html>
<html lang="en">
  <head>
    <title>react sub app</title>
  </head>
  <body>
  <div id="app"></div>
  <script>
    if (typeof __GARFISH_EXPORTS__ !== 'undefined') {
      __GARFISH_EXPORTS__.provider = () => {
        return {
          render ({ dom , basename }) {
            let newContent = document.createElement('div');
            newContent.setAttribute('id', 'react-app');
            newContent.innerHTML = 'react app init page';
            dom.querySelector('#app').appendChild(newContent);
          },

          destroy ({ dom , basename }){
            dom.querySelector('#app').removeChild(dom.querySelector('#react-app'));
          },
        }
      }
    }
  </script>
  </body>
</html>
